Skip to content

Add form validation for MCP config modal#13

Open
liangzhang-keepmoving wants to merge 1 commit intoCopilotKit:mainfrom
liangzhang-keepmoving:feature/mcp-config-improvements
Open

Add form validation for MCP config modal#13
liangzhang-keepmoving wants to merge 1 commit intoCopilotKit:mainfrom
liangzhang-keepmoving:feature/mcp-config-improvements

Conversation

@liangzhang-keepmoving
Copy link
Copy Markdown

Description

This PR adds form validation functionality to the MCP config modal, ensuring that:

  • Server name is required and unique
  • Command is required for stdio servers
  • URL is required and valid for SSE servers

The validation includes error messages displayed to the user, making it clearer what information is needed.

Changes Made

  • Added error state management to the MCP config modal
  • Implemented validation logic for all required fields
  • Added visual error indicators and error messages
  • Improved form submission handling with validation checks

Testing

The validation has been tested with various scenarios:

  • Empty server name
  • Duplicate server name
  • Empty command for stdio server
  • Empty URL for SSE server
  • Invalid URL format

All validation cases work as expected, providing clear error messages to the user.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 23, 2026

Someone is attempting to deploy a commit to the CopilotKit Team on Vercel.

A member of the Team first needs to authorize it.

@liangzhang-keepmoving
Copy link
Copy Markdown
Author

Someone is attempting to deploy a commit to the CopilotKit Team on Vercel.

A member of the Team first needs to authorize it.

Hi, I have registered. But not able to authorize. Could you help? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant